Extend driver signature verification to cover full package (.sys, .cat, .inf) - #1044
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
There was a problem hiding this comment.
Pull request overview
This PR enhances the Functest driver signature verification script to validate the entire installed driver package, not just the .sys, and optionally performs stronger catalog membership checks when signtool is provided.
Changes:
- Extends verification to check Authenticode signatures for both the driver
.sysand the package.cat. - Adds optional
signtool-based verification to ensure.sysand.infhashes are present in the.catcatalog when@signtool_path@is configured. - Implements graceful degradation when
signtoolis not provided or not found (still performs Authenticode checks and exits success with a warning).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| $sys = Get-ChildItem $drvDir -Filter "${module}.sys" | Select-Object -First 1 | ||
| $cat = Get-ChildItem $drvDir -Filter '*.cat' | Select-Object -First 1 | ||
| $inf = Get-ChildItem $drvDir -Filter "${module}.inf" | Select-Object -First 1 |
There was a problem hiding this comment.
After installation, Windows will move driver.inf to oem<N>.inf. This check can work only with the driver binary folder, but not with installed drivers.
@YanVugenfirer Maybe create 2 tests:
- check installer driver (sys only)
- check provided binaries that were used for installation (sys, cat, inf)
|
@kostyanf14 I think we want two tests:
|
da313b2 to
c2f8ade
Compare
Created two new test cases: * driver_package_check: which now checks .sys, .cat, and .inf when doing signature authentication * driver_signtool_check: which leverages extra-software to run signtool verification on the driver. Both are designed to run as a pre-installation check. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: jamepark4 <jparker@redhat.com>
c2f8ade to
d586b3a
Compare
Thanks @kostyanf14 and @YanVugenfirer based on your feedback I removed any changes to the post installation signature check and create two new pre-install checks. One that does analysis on .sys, .inf, and .cat and one that would leverage signtool if it is supplied to the test suite. I wanted to create two pre-install checks just to allow for better granularity of control and debuggability if there were any issues surrounding using the signtool. |
With 2f277e0 landing tests have the capacity to install signtool to extend signature verification.
Previously only checked the .sys Authenticode signature. Now also verifies the .cat catalog signature and, when signtool is available via @signtool_path@, cross-checks .sys and .inf hashes against the catalog. Degrades gracefully when signtool is not configured. Test case json would need to provide expected path to the signtool e.g.: